
    <%   
    String path = request.getContextPath();   
    String basePath = request.getScheme()+"://" +request.getServerName()+":" +request.getServerPort()+path+"/" ;
    
    %>   
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
<title>任务进度</title>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="<%=basePath%>css/ie10-viewport-bug-workaround.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="<%=basePath%>css/signin.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../js/ie8-responsive-file-warning.js"></script><![endif]-->


<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<script type="text/javascript">
	var count = '0';
	$(document).ready(
			function() {
				var dealtask = setInterval(function() {

					var mission_key = $('#mission_key').html();

					if (null != mission_key) {
						var htmlobj = $.ajax({
							url : "<%=basePath%>dosomequery?querytype=CHECK&mission_key="
									+ mission_key,
							async : true,
							success : function(data) {
								//alert(data);
								var count = data;

								if (count == '100.00') {
									clearInterval(dealtask);
									alert('执行完毕');
								} else if (count == '404') {
									clearInterval(dealtask);
									alert('任务未开始，请手动刷新页面');
								}else if (count == '0.00') {
									clearInterval(dealtask);
									count=="0";
								}
								$("#countbar").css('width', count + '%');
								$("#countstr").html(count + '%完成');
							}
						});

					}

				}, 5000);
			});
</script>
</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">

				<a href="#" class="navbar-brand">成绩查询</a>
			</div>
			<div class="navbar-collapse collapse" id="navbar">
				<ul class="nav navbar-nav">
					<li><a href="<%=basePath%>jsp/regist.jsp">注册</a></li>
					<li><a href="http://www.shdc.org.cn/familyServices/index">上海市医院报告查询和门诊预约</a></li><li><a href='<%=basePath%>jsp/downrj.jsp'>下载仁济app</a></li>

				</ul>
			</div>
			<!--/.nav-collapse -->
		</div>
	</nav>
	<div class="page-header">
		<h4>
			用户:${userName}
		</h4>
		<h2>导入进度</h2>
	</div>
	<div class="progress">
		<div id='countbar' style="width: 0%" aria-valuemax="100"
			aria-valuemin="0" aria-valuenow="40" role="progressbar"
			class="progress-bar progress-bar-success"></div>
	</div>
	<div>
		<p id='countstr'></p>
		<p>${message}</p>
		<p style='display: none' id='mission_key'>${mission_key}</p>
	</div>
	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="<%=basePath%>js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
